/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Display

import com.vaadin.ui.*
import com.vaadin.ui.Button.*
import com.vaadin.data.util.*
import com.vaadin.event.*
import com.vaadin.event.Action.Handler
import com.vaadin.ui.Field.*
import com.vaadin.data.Property.*

/**
 *
 * @author patrick
 */
class FieldInput extends com.vaadin.ui.Panel {

    CustomTextField tag = new CustomTextField("Tag")
    CustomTextField artist = new CustomTextField("Artist")
    CustomTextField album = new CustomTextField("Album")
    CustomTextField track = new CustomTextField("Track")
    CustomSelect sort = new CustomSelect("Sort")
    CheckBox cloud = new CheckBox("Cloud")
    CustomSlider time = new CustomSlider("Time", 0, 100)

    public FieldInput() {

        setSizeFull()
        addStyleName("light")

        GridLayout layout = new GridLayout(2,6)
        layout.setSpacing(true)
        setContent(layout)

        /* Explicate cloud checkbox */
        cloud.setValue(false)
         
        /* Add all the created components to the form */
        addComponent( new Label("Tag") )
        addComponent(tag)
        addComponent( new Label("Artist") )
        addComponent(artist)
        addComponent( new Label("Album") )
        addComponent(album)
        addComponent( new Label("Track") )
        addComponent(track)
        addComponent( new Label("Sort") )
        addComponent(sort)
        addComponent( new Label("Time") )
        addComponent(time)
    }
}

